function gui_extract_sound(handles)
try
    hObject = handles.main_figure;

    %inDir = handles.projectStruct.inFile.dirPath;
    %frame_start = handles.project.frame_in
    %frame_end = handles.project.frame_out

    %projectStruct = gui_load_file(hObject, handles.project.source, ...
    %    frame_start, frame_end);
    %if(isempty(projectStruct))
    %    return
    %end

    str = get(handles.frame_in_text, 'String');
    val = sscanf(str,'%lu');
    if(val ~= handles.project.frame_in)
        gui_set(handles.frame_in_text, 'String', str);
    end

    str = get(handles.frame_out_text, 'String');
    val = sscanf(str,'%lu');
    if(val ~= handles.project.frame_out)
        gui_set(handles.frame_out_text, 'String', str);
    end

    projectStruct = gui_copyProject(handles.projectStruct, handles.project, ...
        handles.pref)

    %handles.projectStruct = projectStruct;
    %guidata(hObject,handles);


    % Start timing.
    timeStart = tic;
    clockStart = clock;

    % Extract the sound.

    projectStruct = extractAudio(projectStruct);

    if isempty(projectStruct.audioFileNameCellArr)
        %cd(origDir);
        %path(origPath);
        uiwait(warndlg('No audio found.', 'No audio', 'modal'));
        return;
    end
    % End timing.
    timeElapsed = toc(timeStart);

    toc_time = timeElapsed
    
    if(timeElapsed < 10)
        timeElapsed = etime(clock, clockStart);
        e_time = timeElapsed
    end

    toc_frame_s = handles.projectStruct.inFile.frameRangeArr(1)
    toc_frame_e = handles.projectStruct.inFile.frameRangeArr(2)
    toc_nframe = handles.projectStruct.inFile.frameRangeArr(2) - ...
            handles.projectStruct.inFile.frameRangeArr(1) + 1
        
    if(timeElapsed > 10)
        secPerFrame = double(timeElapsed)/double(...
            handles.projectStruct.inFile.frameRangeArr(2) - ...
            handles.projectStruct.inFile.frameRangeArr(1) + 1)
        uiwait(msgbox({['Sound reconstruction ran at ' ...
            num2str(secPerFrame, '%.1f') ' seconds per frame,'], ...
            ['i.e., at ' num2str(60.0/secPerFrame, '%.1f') ' frames per minute.']},...
            'Finished', 'modal'));
    else
        uiwait(msgbox('Sound reconstruction complete.','Finished','modal'));
    end

    handles.project.audio_file_arr = projectStruct.audioFileNameCellArr;
    handles.projectStruct = projectStruct;
    %handles.project.video_file = videoFileNameCellArr{end};
    handles.unsaved_changes = true;
    guidata(hObject, handles);
catch exception
    gui_exception(exception);
end
